Caption = "Browsing catalogs for available entries"
Height = 855
Left = 360
TabIndex = 18
Top = 2160
Visible = 0 'False
Width = 975
End
Begin VB.Label Label8
Caption = "Available dates for the selected file:"
Height = 375
Left = 5520
TabIndex = 15
Top = 600
Width = 1695
End
Begin VB.Label Label7
Caption = "Available registry keys:"
Height = 255
Left = 1920
TabIndex = 14
Top = 2280
Width = 1695
End
Begin VB.Label Label6
Caption = "Available files:"
Height = 255
Left = 1920
TabIndex = 12
Top = 720
Width = 1095
End
Begin VB.Line Line1
BorderColor = &H80000011&
Index = 0
X1 = 2913.077
X2 = 2913.077
Y1 = 120
Y2 = 4080
End
Begin VB.Line Line1
BorderColor = &H80000009&
Index = 1
X1 = 2939.086
X2 = 2939.086
Y1 = 120
Y2 = 4080
End
Begin VB.Label Label5
Caption = "Step 2 of 4"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 11
Top = 3840
Width = 1095
End
Begin VB.Image Image1
Height = 1260
Left = 120
Picture = "frmThree.frx":0BC2
Top = 120
Width = 1410
End
Begin VB.Label Label4
Caption = "End"
Height = 255
Left = 5640
TabIndex = 9
Top = 3000
Width = 375
End
Begin VB.Label Label3
Caption = "Begin"
Height = 255
Left = 5640
TabIndex = 8
Top = 2640
Width = 495
End
Begin VB.Label Label2
Caption = "What would you like to restore?"
Height = 255
Left = 1920
TabIndex = 7
Top = 360
Width = 2655
End
Begin VB.Label Label1
Caption = "File and Registry key selection"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1920
TabIndex = 5
Top = 120
Width = 2895
End
Attribute VB_Name = "frmThree"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const LB_GETITEMHEIGHT = &H1A1
Dim xClass As clsXceed
Dim ExitInc As Integer
Dim cFileDates As Collection
Dim WithEvents xLocalMain As XceedBackup
Attribute xLocalMain.VB_VarHelpID = -1
Public Function ShowForm(xObjects As clsXceed) As Integer
'This is where you will fill in the fields on your forms with the values
'in xObjects.
txtMinDate.Text = xObjects.xSelection.MinDate
txtMaxDate.Text = xObjects.xSelection.MaxDate
Set xClass = xObjects
Me.Left = xClass.PositionLeft
Me.Top = xClass.PositionTop
'Browse for files in the background
xClass.xSelection.FilesToProcess = "*<R>"
xClass.xSelection.FilesToExclude = ""
xClass.xSelection.MinDate = bkpMinimumDate
xClass.xSelection.MaxDate = bkpMaximumDate
xClass.xSelection.RegKeysToInclude = "*"
xClass.xMain.BackgroundProcessing = True
' Reset lists and collections
Set cFileDates = Nothing
Set cFileDates = New Collection
lstFiles.Clear
lstKeys.Clear
' We want our own form to receive events, so launch process from our variable
If nIndex > lstKeys.ListCount - 1 Or nIndex < 0 Then
lstKeys.ToolTipText = ""
Else
lstKeys.ToolTipText = lstKeys.List(nIndex)
End If
End Sub
Private Sub xLocalMain_BrowsingCatalogEntry(ByVal sFilename As String, ByVal lSize As Long, ByVal xAttributes As XceedBackupLib.bkpFileAttributes, ByVal dtLastModified As Date, ByVal dtLastAccessed As Date, ByVal dtCreated As Date, ByVal lDiskNumber As Long, ByVal sMediaLabel As String)
Dim nIndex As Integer
Dim i As Long
If Len(sFilename) > 4 And Left(sFilename, 4) = "HKEY" Then
nIndex = FindStringInList(lstKeys, sFilename)
If nIndex = -1 Then
lstKeys.AddItem sFilename
nIndex = lstKeys.NewIndex
' Check if already in selected list
For i = 0 To xClass.SelectedKeysCount - 1
If xClass.SelectedKeys(i) = sFilename Then
lstKeys.Selected(nIndex) = True
Exit For
End If
Next i
End If
Else
Dim xFileDates As clsDateList
nIndex = FindStringInList(lstFiles, sFilename)
If nIndex = -1 Then
Dim lKey As Long
Set xFileDates = New clsDateList
xFileDates.AddItem dtLastModified
lstFiles.AddItem sFilename
nIndex = lstFiles.NewIndex
lKey = cFileDates.Count
cFileDates.Add xFileDates, Str(lKey)
lstFiles.ItemData(nIndex) = lKey
' Check if already in selected list
For i = 0 To xClass.SelectedFilesCount - 1
If xClass.SelectedFiles(i) = sFilename Then
lstFiles.Selected(nIndex) = True
Exit For
End If
Next i
Else
Set xFileDates = cFileDates.Item(Str(lstFiles.ItemData(nIndex)))
xFileDates.AddItem dtLastModified
End If
End If
End Sub
Private Sub xLocalMain_ProcessCompleted(ByVal lFilesTotal As Long, ByVal lFilesProcessed As Long, ByVal lFilesSkipped As Long, ByVal lBytesTotal As Long, ByVal lBytesProcessed As Long, ByVal lBytesSkipped As Long, ByVal xResult As XceedBackupLib.bkpError)